"""
   author: 陈亚敏
   data: 2021/12/8  18:39
   project: 1
"""
# 1:
# list1=[7,-8,5,4,0,-2,-5]
# print(sorted(i for i in list1 if i>0)+(sorted(i for i in list1 if i<0))[::-1])

#2:
# s='asdf234GDSdsf23'
# print(sorted(i for i in s if i.isalpha())[::-1]+sorted(i for i in s if i.isdigit() and int(i)%2==0)+
#       sorted(i for i in s if i.isdigit() and int(i)%2==1))

#3:
# def f1(a):
#     if 6<len(a)<18 and (a[0].isdigit()) and a.isalnum()+('_'in a)>=1:
#         return 'username符合规范',a
#
#     else:
#         return 'username不符合规范'
# list1=['sdsd3432__','f','jewnrk___111','11____fsfs']
# print(list(map(f1,list1)))


#4:
from functools import reduce
# num1=int(input("请输入你要计算的阶乘数："))
# print(reduce(lambda x,y:x*y,range(1,num1+1)))

#5:
# print(list(filter(lambda x:x%3==0,range(1,101))))


#6:
# print(list(map(lambda x:x*x,range(1,11))))

#7:
# print(reduce(lambda x,y:x*10+y,[1,4,5,9]))


#8:
import string
import random

# def f1(a):
#     maxnum=0
#     for i in a:
#         if len(i)>maxnum:
#             maxnum=len(i)
#             yield maxnum,i
#
#
#         # with open('data128.txt','a+',encoding='utf-8')as f:
# #     for i in range(1000):
# #         f.write(''.join(random.choices(string.ascii_lowercase,k=random.randint(1,50)))+'\n')
#
# with open('data128.txt','r')as fp:
#     l1=f1(fp.readlines())
#     print(l1.__next__())
#     print(l1.__next__())
#     print(l1.__next__())
#     print(l1.__next__())
#     print(l1.__next__())
#     print(l1.__next__())



